package Oct_2020.part6;

import java.util.Arrays;

public class Str {
    public static void main(String[] args) {
        char[] val = {'芜', '湖', '大', '司', '马'};
        String s = new String(val);
        System.out.println(s);
        int b = s.lastIndexOf('大');
        int len = s.length();
        System.out.println(b);
        String low = s.toLowerCase();
        int com = s.compareTo("eve");
        int hash = s.hashCode();
        System.out.println(hash);
        System.out.println(com);
        System.out.println(s.equals("芜湖大司马"));
        System.out.println(s.isEmpty());//是否为空
        System.out.println(s.lastIndexOf("马"));
        System.out.println(s.length());
        System.out.println(s.trim());//去除两端空格
        System.out.println(s.startsWith("pre"));
        System.out.println(s.substring(0, 2));
        System.out.println(s.toUpperCase());
        System.out.println(s.getBytes());
        System.out.println("SPLIT" + Arrays.toString(s.split("大")));
        System.out.println(s.toCharArray());
        System.out.println(String.valueOf(1000));

    }
}
